home *** CD-ROM | disk | FTP | other *** search
- ; ImageFX 2.0 -> 2.1a Patch Install Script
- ;
- ; Written by Thomas Krehbiel
- ;
- ; Copyright © 1995 Nova Design, Inc.
- ; All Rights Reserved
-
- (
-
- ;================================================================
- ; Procedure Definitions
- ;================================================================
-
- (procedure RunLhex
- ; pf_archive = name of archive to extract from
- ; pf_name = name of file to extract
- ; tempdir = directory to extract to
- (
- (set pf_error
- (run
- ("RAM:lhex -a -f \"-w=%s\" x %s %s"
- tempdir
- pf_archive
- pf_name
- )
- )
- )
- )
- )
-
- (procedure RunPatch
- ; pf_old = old version of file
- ; pf_new = where to put new version of file
- ; pf_patch = name of patch file
- (
- (set pf_error
- (run
- ("RAM:spatch \"-o%s\" \"-p%s\" \"%s\""
- pf_new
- pf_patch
- pf_old
- )
- )
- )
- )
- )
-
- (procedure DoPatch
- ; pf_name = name of file with path
- ; wheredir = where old files reside
- ; patchdir = where patches reside
- (
- (set pf_user (tackon wheredir pf_name))
- (set pf_old (tackon tempdir pf_name))
- (set pf_new ("%s.new" (tackon wheredir pf_name)))
- (set pf_patch ("%s.pch" (tackon patchdir pf_name)))
- (if (exists pf_user)
- (
- ; only if it was installed
- (working "Reading " pf_archive)
- (RunLhex)
- (if pf_error
- (
- (message "LHEX failed on `" pf_archive "'.")
- )
- )
- (working "Updating " pf_name)
- (RunPatch)
- (if pf_error
- (
- (message "Patch failed on file `" pf_user "'.")
- )
- ; else
- (
- (delete pf_user)
- (rename pf_new pf_user)
- )
- )
- (delete pf_old)
- )
- )
- )
- )
-
- ;================================================================
- ; Setup
- ;================================================================
-
- ; script variables...
-
- (set versionname "2.1a") ; version number
- (set programname ("ImageFX %s" versionname)) ; name of program
- (set diskname1 "ImageFX_Disk1:") ; install disk name
- (set diskname2 "ImageFX_Disk2:") ; second install disk name
- (set diskname3 "ImageFX_Disk3:") ; third install disk name
- (set diskname4 "ImageFX_Disk4:") ; fourth install disk name
- (set pdiskname1 "") ; patch install disk 1 name
- (set pdiskname2 "") ; patch install disk 2 name
-
- (set tempdir "T:")
-
- ; system information...
-
- (set osver (/ (getversion) 65536)) ; os version
- (set cputype (database "cpu")) ; cpu type
-
- ;-------------------
- ; Pick a default directory for the installation...
- (set initialdir @default-dest) ; defaults to biggest drive
- (if (getassign "ImageFX")
- (
- (set initialdir (getassign "ImageFX"))
- )
- ; else
- (
- (if (getassign "ImageFX2")
- (
- (set initialdir (getassign "ImageFX2"))
- ; if we found ImageFX2:, assume user wants to keep ImageFX2:
- (set assignname "ImageFX2")
- )
- )
- )
- )
-
- (set tryagain 1)
- (while tryagain
- (
-
- (set tryagain 0)
-
- ;-------------------
- ; Ask where to install it...
- ;(set wheredir initialdir)
- (set wheredir
- (askdir
- (prompt "Select the directory where ImageFX is currently installed. The files in "
- "this directory will be updated to version " versionname ". All of your "
- "preferences will be preserved. NOTE: You will need your original ImageFX 2.0 "
- "disks to install this update (they will not be modified).")
- (help @askdir-help)
- (default initialdir)
- )
- )
-
- ;-------------------
- ; Make sure it's a valid ImageFX
- (set checkvar 0)
- (set checkvar (+ checkvar (exists (tackon wheredir "Modules/Sys/Scale"))))
- (set checkvar (+ checkvar (exists (tackon wheredir "Hooks/Sys/PaintFX"))))
- (if (= 0 checkvar)
- (
- (message "`" wheredir "' does not appear to contain a copy of ImageFX 2.0.")
- (set tryagain 1)
- (set initialdir wheredir)
- )
- )
-
- )
- )
-
- (message "The " programname " update will be installed in the drawer `" wheredir "'. If this is correct, click `Proceed'.")
-
- (set @default-dest wheredir)
-
- ;-------------------
- ; Ask which versions of modules the user wants to install.
- ;(set cpu
- ; (askchoice
- ; (prompt "Select which versions of hooks and modules you would "
- ; "like to install:")
- ; (help "Some ImageFX hooks and modules (such as the JPEG modules) "
- ; "have alternate versions optimized for faster processors. "
- ; "You may choose to install only the modules optimized for "
- ; "the processor in your machine to save hard drive space.")
- ; (choices
- ; "For Any Processor"
- ; "For 68000 Or 68010"
- ; "For 68020 Or 68030, No Floating Point"
- ; "For 68020 Or 68030, With Floating Point"
- ; "For 68040, With Floating Point"
- ; )
- ; (default 0)
- ; )
- ;)
-
- ;-------------------
- ; Ask which hardware components to install
- ; 2.1: added cybergraphics & toaster
- (set hardware
- (askoptions
- (prompt "Select the " versionname " display drivers you would like to install:")
- (help "Check the boxes to indicate which display adaptors you have "
- "installed on your system.")
- (choices
- "Cybergraphics"
- "Video Toaster"
- )
- )
- )
- ; 2.1: added scanjet & primerapro
- (set hardware2
- (askoptions
- (prompt "Select the " versionname " hardware drivers you would like to install:")
- (help "Check the boxes to indicate which peripherals you have "
- "installed on your system.")
- (choices
- "HP ScanJet Scanner"
- "Primera Printer"
- "PrimeraPro Printer"
- )
- )
- )
-
- (set mask_cyber 1)
- (set mask_toast 2)
-
- (set mask_scanjet 1)
- (set mask_prim 2)
- (set mask_primpro 4)
-
- ;================================================================
- ; PATCH EXISTING FILES
- ;================================================================
-
- ;-------------------
- ; Copy SPATCH to RAM: for speediness
- (copyfiles
- (prompt "")
- (help "")
- (source pdiskname1)
- (dest "RAM:")
- (choices "spatch")
- )
-
- ;================================================================
- ; DISK 1
- ;================================================================
-
- (askdisk
- (prompt "Please insert ImageFX 2.0 Disk 1 in any drive.")
- (help "")
- (dest (substr diskname1 0 (- (strlen diskname1) 1)))
- (assigns)
- )
-
- ;-------------------
- ; Copy LHEX to RAM: for speediness
- (copyfiles
- (prompt "")
- (help "")
- (source diskname1)
- (dest "RAM:")
- (choices "lhex")
- )
-
- ;-------------------
- ; Begin by extracting our patch archive into the user's
- ; chosen ImageFX directory. This will be deleted at the end.
-
- (working "Extracting Update Files (1 of 2)...")
-
- (set patchdir (tackon wheredir "Patches"))
- (makedir patchdir)
-
- (run
- ("RAM:lhex >CON:0/0//80/lhex/AUTO -a -f \"-w=%s\" x %s"
- patchdir
- (tackon pdiskname1 "Patches1.lha")
- )
- )
-
- (if (= 0 (exists (tackon pdiskname1 "Patches2.lha")))
- (
- (set pdiskname2 "IFX_20to21a_Disk2:") ; patch install disk 2 name
- (askdisk
- (prompt "Please insert ImageFX Patch Disk 2 in any drive.")
- (help "")
- (dest (substr pdiskname2 0 (- (strlen pdiskname2) 1)))
- (assigns)
- )
- )
- )
-
- (working "Extracting Update Files (2 of 2)...")
-
- (run
- ("RAM:lhex >CON:0/0//80/lhex/AUTO -a -f \"-w=%s\" x %s"
- patchdir
- (tackon pdiskname2 "Patches2.lha")
- )
- )
-
- ;-------------------
- ; ImageFX & Browser
-
- (copyfiles
- (prompt "")
- (help "")
- (source diskname1)
- (dest tempdir)
- (choices "Program.lha")
- )
-
- (set pf_archive (tackon tempdir "Program.lha"))
-
- (set pf_name "ImageFX") (DoPatch)
- (set pf_name "Browser") (DoPatch)
-
- (delete (tackon tempdir "Program.lha"))
-
-
- ;-------------------
- ; Rexx
-
- (copyfiles
- (prompt "")
- (help "")
- (source diskname1)
- (dest tempdir)
- (choices "Rexx.lha")
- )
-
- (set pf_archive (tackon tempdir "Rexx.lha"))
-
- (set pf_name "Rexx/CreateNails.ifx") (DoPatch) ; 2.1a
-
- (set pf_name "Rexx/AutoFX/SaveBufferAs_MPEG.ifx") (DoPatch) ; 2.1a
- (set pf_name "Rexx/AutoFX/AutoFX.ifx.pre") (DoPatch)
- (set pf_name "Rexx/AutoFX/Scale_Percent.ifx.pre") (DoPatch)
- (set pf_name "Rexx/AutoFX/SaveBufferAs.ifx") (DoPatch)
- (set pf_name "Rexx/AutoFX/SaveBufferAs.ifx.pre") (DoPatch)
- (set pf_name "Rexx/AutoFX/SaveBufferAs_ILBM.ifx") (DoPatch)
- (set pf_name "Rexx/AutoFX/SaveBufferAs_ILBM.ifx.pre") (DoPatch)
- (set pf_name "Rexx/AutoFX/SaveBufferAs_JPEG.ifx") (DoPatch)
- (set pf_name "Rexx/AutoFX/SaveBufferAs_JPEG.ifx.pre") (DoPatch)
- (set pf_name "Rexx/AutoFX/SaveRenderedAs.ifx") (DoPatch)
- (set pf_name "Rexx/AutoFX/SaveRenderedAs.ifx.pre") (DoPatch)
- (set pf_name "Rexx/AutoFX/SaveRenderedAs_ILBM.ifx") (DoPatch)
- (set pf_name "Rexx/AutoFX/SaveRenderedAs_ILBM.ifx.pre") (DoPatch)
- (set pf_name "Rexx/AutoFX/Render_Amiga.ifx.pre") (DoPatch)
- (set pf_name "Rexx/AutoFX/Render_Foreign.ifx.pre") (DoPatch)
-
- (set pf_name "Rexx/Browser/CreateNails.browse") (DoPatch)
-
- (delete (tackon tempdir "Rexx.lha"))
- (run ("delete %s all quiet" (tackon tempdir "Rexx")))
-
-
- ;-------------------
- ; Libs
-
- (copyfiles
- (prompt "")
- (help "")
- (source diskname1)
- (dest tempdir)
- (choices "Libs.lha")
- )
-
- ; this one's kinda special
- (set pf_archive (tackon tempdir "Libs.lha"))
- (set pf_name "Libs/thumbnail.library")
- (set pf_user "LIBS:thumbnail.library")
- (set pf_old (tackon tempdir "Libs/thumbnail.library"))
- (set pf_new "LIBS:thumbnail.library.new")
- (set pf_patch (tackon patchdir "Libs/thumbnail.library.pch"))
- (if (exists pf_user)
- (
- ; only if it was installed
- (working "Reading Libs.lha")
- (RunLhex)
- (working "Updating LIBS:thumbnail.library")
- (RunPatch)
- (if pf_error
- (
- (message "Patch failed on file `" pf_user "'.")
- )
- ; else
- (
- (delete pf_user)
- (rename pf_new pf_user)
- )
- )
- (delete pf_old)
- )
- )
-
- (delete (tackon tempdir "Libs.lha"))
- (run ("delete %s all quiet" (tackon tempdir "Libs")))
-
-
- ;-------------------
- ; Help
-
- (copyfiles
- (prompt "")
- (help "")
- (source diskname1)
- (dest tempdir)
- (choices "Help.lha")
- )
-
- (set pf_archive (tackon tempdir "Help.lha"))
-
- (set pf_name "Help/Arexx_Hooks.guide") (DoPatch)
- (set pf_name "Help/Arexx_Loaders.guide") (DoPatch)
- (set pf_name "Help/Arexx_Savers.guide") (DoPatch)
- (set pf_name "Help/Arexx_Renders.guide") (DoPatch)
- (set pf_name "Help/Arexx_Scanners.guide") (DoPatch)
- (set pf_name "Help/Arexx_CineMorph.guide") (DoPatch)
-
- (delete (tackon tempdir "Help.lha"))
- (run ("delete %s all quiet" (tackon tempdir "Help")))
-
-
- ;================================================================
- ; DISK 2
- ;================================================================
-
- (askdisk
- (prompt "Please insert ImageFX 2.0 Disk 2 in any drive.")
- (help "")
- (dest (substr diskname2 0 (- (strlen diskname2) 1)))
- (assigns)
- )
-
- ;-------------------
- ; Modules
-
- ; copy modules.lha to ram for speed
- (copyfiles
- (prompt "")
- (help "")
- (source diskname2)
- (dest tempdir)
- (choices "Modules.lha")
- )
-
- (set pf_archive (tackon tempdir "Modules.lha"))
-
- (set pf_name "Modules/Drawmodes2/Darken") (DoPatch)
- (set pf_name "Modules/Drawmodes2/Disperse") (DoPatch)
- (set pf_name "Modules/Drawmodes2/FingerPaint") (DoPatch)
- (set pf_name "Modules/Drawmodes2/Lighten") (DoPatch)
- (set pf_name "Modules/Drawmodes2/Smudge") (DoPatch)
-
- (set pf_name "Modules/Drawstyles2/AvgRubThru") (DoPatch)
- (set pf_name "Modules/Drawstyles2/Pantograph") (DoPatch)
-
- (set pf_name "Modules/Loaders/BMP") (DoPatch) ; 2.1a
- (set pf_name "Modules/Loaders/DataTypes") (DoPatch)
- (set pf_name "Modules/Loaders/FrameStore.000") (DoPatch)
- (set pf_name "Modules/Loaders/FrameStore.030") (DoPatch)
- (set pf_name "Modules/Loaders/PDS_VICAR") (DoPatch)
- (set pf_name "Modules/Loaders/PICT") (DoPatch)
- (set pf_name "Modules/Loaders/Targa") (DoPatch)
- (rename (tackon wheredir "Modules/Loaders/PICT") (tackon wheredir "Modules/Loaders/PICT.000"))
-
- (set pf_name "Modules/Preview/Firecracker") (DoPatch)
- (set pf_name "Modules/Preview/RetinaWB") (DoPatch)
- (set pf_name "Modules/Preview/Workbench") (DoPatch)
-
- (set pf_name "Modules/Printer/Primera") (DoPatch)
-
- (set pf_name "Modules/Quantize/LowMemMdnCut") (DoPatch)
-
- (set pf_name "Modules/Render/Amiga") (DoPatch)
- (set pf_name "Modules/Render/Amiga1.3") (DoPatch)
- (set pf_name "Modules/Render/Foreign") (DoPatch)
-
- (set pf_name "Modules/Savers/FrameStore.000") (DoPatch)
- (set pf_name "Modules/Savers/FrameStore.030") (DoPatch)
- (set pf_name "Modules/Savers/PCX") (DoPatch)
- (set pf_name "Modules/Savers/Softimage") (DoPatch)
- (set pf_name "Modules/Savers/Targa") (DoPatch)
-
- (set pf_name "Modules/Scanner/Epson") (DoPatch)
- (set pf_name "Modules/Scanner/JX100") (DoPatch)
-
- (set pf_name "Modules/Sys/Distort") (DoPatch)
- (set pf_name "Modules/Sys/DynamicRange") (DoPatch)
- (set pf_name "Modules/Sys/MotionBlur") (DoPatch)
- (set pf_name "Modules/Sys/Rotate") (DoPatch)
- (set pf_name "Modules/Sys/Scale") (DoPatch)
- (set pf_name "Modules/Sys/UserConvolve") (DoPatch)
- (set pf_name "Modules/Sys/RIP") (DoPatch)
-
- (delete (tackon tempdir "Modules.lha"))
- (run ("delete %s all quiet" (tackon tempdir "Modules")))
-
- ;================================================================
- ; DISK 3
- ;================================================================
-
- (askdisk
- (prompt "Please insert ImageFX 2.0 Disk 3 in any drive.")
- (help "")
- (dest (substr diskname3 0 (- (strlen diskname3) 1)))
- (assigns)
- )
-
- ;-------------------
- ; Hooks
-
- ; copy hooks.lha to ram for speed
- (copyfiles
- (prompt "")
- (help "")
- (source diskname3)
- (dest tempdir)
- (choices "Hooks.lha")
- )
-
- (set pf_archive (tackon tempdir "Hooks.lha"))
-
- (set pf_name "Hooks/AutoFX") (DoPatch) ; 2.1a
- (set pf_name "Hooks/CMIFX") (DoPatch) ; 2.1a
- (set pf_name "Hooks/CMIFX.FP") (DoPatch) ; 2.1a
- (set pf_name "Hooks/Measure") (DoPatch) ; 2.1a
- (set pf_name "Hooks/Hist") (DoPatch)
- (set pf_name "Hooks/IMP") (DoPatch)
-
- (set pf_name "Hooks/Sys/AntiAlias") (DoPatch)
- (set pf_name "Hooks/Sys/Composite") (DoPatch)
- (set pf_name "Hooks/Sys/Crystallize") (DoPatch)
- (set pf_name "Hooks/Sys/Deinterlace") (DoPatch)
- (set pf_name "Hooks/Sys/Interlace") (DoPatch)
- (set pf_name "Hooks/Sys/Lightning.FP") (DoPatch)
- (set pf_name "Hooks/Sys/Lightning") (DoPatch)
- (set pf_name "Hooks/Sys/PaintFX") (DoPatch)
- (set pf_name "Hooks/Sys/Perspective.FP") (DoPatch)
- (set pf_name "Hooks/Sys/Perspective") (DoPatch)
- (set pf_name "Hooks/Sys/Rotate") (DoPatch)
- (set pf_name "Hooks/Sys/Shear") (DoPatch)
- (set pf_name "Hooks/Sys/Text") (DoPatch)
-
- (delete (tackon tempdir "Hooks.lha"))
- (run ("delete %s all quiet" (tackon tempdir "Hooks")))
-
- ;================================================================
- ; DISK 4
- ;================================================================
-
- ; (nothing to do on disk 4)
-
- ;================================================================
- ; INSTALL NEW FILES
- ;================================================================
-
- ; don't need these any more
- (delete "RAM:spatch")
- (delete "RAM:lhex")
-
- (if (BITAND mask_scanjet hardware)
- (
- (copyfiles
- (prompt "")
- (help "")
- (source (tackon patchdir "Modules/Scanner"))
- (dest (tackon wheredir "Modules/Scanner"))
- (choices "ScanJet")
- )
- (copyfiles
- (prompt "")
- (help "")
- (source (tackon patchdir "Help"))
- (dest (tackon wheredir "Help"))
- (choices "Scanner_ScanJet.guide")
- )
- )
- )
-
- (if (BITAND mask_toast hardware)
- (
- (copyfiles
- (prompt "")
- (help "")
- (source (tackon patchdir "Modules/Scanner"))
- (dest (tackon wheredir "Modules/Scanner"))
- (choices "Toaster")
- )
- (copyfiles
- (prompt "")
- (help "")
- (source (tackon patchdir "Help"))
- (dest (tackon wheredir "Help"))
- (choices "Scanner_Toaster.guide")
- )
- (copyfiles
- (prompt "")
- (help "")
- (source (tackon patchdir "Modules/Render"))
- (dest (tackon wheredir "Modules/Render"))
- (choices "Toaster")
- )
- (copyfiles
- (prompt "")
- (help "")
- (source (tackon patchdir "Modules/Loaders"))
- (dest (tackon wheredir "Modules/Loaders"))
- (choices "FlyerClip") ; 2.1a
- )
- (copyfiles
- (prompt "")
- (help "")
- (source (tackon patchdir "Help"))
- (dest (tackon wheredir "Help"))
- (choices "Render_Toaster.guide")
- )
- (copyfiles
- (prompt "")
- (help "")
- (source (tackon patchdir "Modules/Preview"))
- (dest (tackon wheredir "Modules/Preview"))
- (choices "Toaster")
- )
- )
- )
-
- (if (BITAND mask_prim hardware)
- (
- (copyfiles
- (prompt "")
- (help "")
- (source (tackon patchdir "Modules/Printer"))
- (dest (tackon wheredir "Modules/Printer"))
- (choices "Default.Primera")
- )
- (copyfiles
- (prompt "")
- (help "")
- (source (tackon patchdir "Devs/Printers"))
- (dest "DEVS:Printers")
- (choices "Primera.FZP")
- )
- )
- )
-
- (if (BITAND mask_primpro hardware)
- (
- (copyfiles
- (prompt "")
- (help "")
- (source (tackon patchdir "Modules/Printer"))
- (dest (tackon wheredir "Modules/Printer"))
- (choices "PrimeraPro" "Default.Primera")
- )
- (copyfiles
- (prompt "")
- (help "")
- (source (tackon patchdir "Help"))
- (dest (tackon wheredir "Help"))
- (choices "Printer_PrimeraPro.guide")
- )
- )
- )
-
- (if (BITAND mask_cyber hardware)
- (
- (copyfiles
- (prompt "")
- (help "")
- (source (tackon patchdir "Modules/Preview"))
- (dest (tackon wheredir "Modules/Preview"))
- (choices "CyberWB")
- )
- ; render module is an extra
- )
- )
-
- (copyfiles
- (prompt "")
- (help "")
- (source (tackon patchdir "Modules/Loaders"))
- (dest (tackon wheredir "Modules/Loaders"))
- (choices
- "PNG" ; 2.1a
- "PICT.030" "PICT.040"
- )
- )
-
- (copyfiles
- (prompt "")
- (help "")
- (source (tackon patchdir "Modules/Savers"))
- (dest (tackon wheredir "Modules/Savers"))
- (choices
- "PNG" ; 2.1a
- )
- )
-
- (copyfiles
- (prompt "")
- (help "")
- (source (tackon patchdir "Hooks"))
- (dest (tackon wheredir "Hooks"))
- (choices "CineMatte" "CMIFX.info" "CMIFX.FP.info")
- )
-
- (copyfiles
- (prompt "")
- (help "")
- (source (tackon patchdir "Rexx/AutoFX"))
- (dest (tackon wheredir "Rexx/AutoFX"))
- (choices
- "CineMatte.ifx" ; 2.1a
- "Load_Region.ifx"
- "Load_Region.ifx.pre"
- "RenameOneForSequence.ifx"
- "RenameOneForSequence.ifx.pre"
- "SaveBufferAs_ILBM+A.ifx"
- "SaveBufferAs_ILBM+A.ifx.pre"
- "EOT_Pinch.ifx"
- "EOT_Pinch.ifx.pre"
- "EOT_Punch.ifx"
- "EOT_Punch.ifx.pre"
- "EOT_Swirl.ifx"
- "EOT_Swirl.ifx.pre"
- "EOT_Ripple.ifx"
- "EOT_Ripple.ifx.pre"
- )
- )
-
- (copyfiles
- (prompt "")
- (help "")
- (source patchdir)
- (dest wheredir)
- (choices
- "ImageFX_CyberWB.info"
- "ImageFX_RetinaWB.info"
- "Standard.toolbox" ; 2.1a
- )
- )
- (tooltype
- (prompt "")
- (help "")
- (dest (tackon wheredir "ImageFX_CyberWB"))
- (noposition)
- )
- (tooltype
- (prompt "")
- (help "")
- (dest (tackon wheredir "ImageFX_RetinaWB"))
- (noposition)
- )
-
- ; delete the patches
- (run ("delete %s all quiet" patchdir))
-
- ; Installation complete!
- )
-
- ; Revision History:
- ;
- ; 06.04.95 tek Created.
- ; 11.04.95 tek Modified slightly for Beta 1 release - added help files.
- ; 14.04.95 tek Moved extras to separate install. Added more arexx stuff.
- ; 17.04.95 tek Added new autofx scripts.
- ; 18.04.95 tek Added new CyberWB/RetinaWB icons.
- ; 20.04.95 tek Added mention of the fact that the 2.0 disks aren't harmed.
- ; 20.04.95 tek Added Lightning patch.
- ; 27.04.95 tek Added RIP patch.
- ; 07.11.95 tek Updated for 2.0 -> 2.1a patch operation.
- ; 10.11.95 tek Split into two disks.
-